package com.ldcc.report_system.api.results;

import com.ldcc.report_system.R;

import java.util.ArrayList;
import java.util.List;

/**
 * @author wwg
 * @description 引导页元素实体类
 * @date 24/10/2021 下午12:09
 */
public class GuidePageElement {

    private int image;

    private int text1;


    private int text2;


    private int text3;


    private int text4;

    private int text5;

    List<Integer> dotList;

    public GuidePageElement() {
    }

    public GuidePageElement(int image, int text1, int text2, int text3, int text4, int text5, List<Integer> dotList) {
        this.image = image;
        this.text1 = text1;
        this.text2 = text2;
        this.text3 = text3;
        this.text4 = text4;
        this.text5 = text5;
        this.dotList = dotList;
    }

    public int getImage() {
        return image;
    }

    public void setImage(int image) {
        this.image = image;
    }

    public int getText1() {
        return text1;
    }

    public void setText1(int text1) {
        this.text1 = text1;
    }

    public int getText2() {
        return text2;
    }

    public void setText2(int text2) {
        this.text2 = text2;
    }

    public int getText3() {
        return text3;
    }

    public void setText3(int text3) {
        this.text3 = text3;
    }

    public int getText4() {
        return text4;
    }

    public void setText4(int text4) {
        this.text4 = text4;
    }

    public int getText5() {
        return text5;
    }

    public void setText5(int text5) {
        this.text5 = text5;
    }

    public List<Integer> getDotList() {
        return dotList;
    }

    public void setDotList(List<Integer> dotList) {
        this.dotList = dotList;
    }

    /**
     * 设置引导页圆点样式
     * @param totalNum 圆点总数
     * @param currentNum 当前圆点序号，从0开始
     */
    public void setGuideDot(int totalNum, int currentNum) {
        this.dotList = new ArrayList<>();
        for (int i=0;i<totalNum;i++) {
            if (i == currentNum) {
                this.dotList.add(R.drawable.guide_blue_dot);
            }else {
                this.dotList.add(R.drawable.guide_grey_dot);
            }
        }
    }

    @Override
    public String toString() {
        return "GuidePageElement{" +
                "image=" + image +
                ", text1=" + text1 +
                ", text2=" + text2 +
                ", text3=" + text3 +
                ", text4=" + text4 +
                ", text5=" + text5 +
                ", dotList=" + dotList +
                '}';
    }
}
